package com.wzdigit.wms.basic.mapper.core.basic;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.domain.basic.Carrier;
import com.wzdigit.wms.basic.client.request.basic.SearchCarrierRequest;
import com.wzdigit.wms.basic.client.response.basic.CarrierApiResponse;
import com.wzdigit.wms.basic.client.response.basic.CarrierResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 承运人 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2020-12-28
 */
@MyBatisRepository
public interface CarrierMapper extends BaseMapper<Carrier> {
	
	@SuppressWarnings("rawtypes")
	List<CarrierResponse> selectAll(@Param("dto") SearchCarrierRequest dto);

	CarrierResponse selectOneByCarrierId(@Param("carrierId") Integer carrierId);
	
	List<CarrierApiResponse> selectAllByStatus(@Param("status") Integer status);

	Carrier selectOneByCarrierCode(@Param("carrierCode") String carrierCode);

	Carrier selectOneByCarrierName(@Param("carrierName") String carrierName);
	
	int updateStatus(Carrier record);
	
    int deleteByPrimaryKey(Integer carrierId);

    int insert(Carrier record);

    Carrier selectByPrimaryKey(Integer carrierId);

    int updateByPrimaryKeySelective(Carrier record);

    int updateByPrimaryKey(Carrier record);
}